<!DOCTYPE html>
<html>
<head>
  <title><?php echo isset($title) ? $title : ""; ?></title>

  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />

  <?php
  if(isset($keywords)):
    ?>
  <meta name="keywords" value="<?php echo $keywords; ?>" />
  <?php
  endif;

  if(isset($description)):
    ?>
  <meta name="description" value="<?php echo $description; ?>" />
  <?php
  endif;
  ?>

  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta charset="utf-8" />

  <link href="<?php echo base_url('assets/css/bootstrap.min.css'); ?>" rel="stylesheet" media="screen">
  <link href="<?php echo base_url('assets/css/bootstrap-glyphicons.css'); ?>" rel="stylesheet">
  <link href="<?php echo base_url('assets/css/main.css'); ?>" rel="stylesheet" media="screen">

  <?php
  if(isset($css) && is_array($css) && count($css) > 0){
    foreach($css as $item){
      echo '<link href="'.$item.'" rel="stylesheet" media="screen">';
    }
  }
  ?>

  <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-45742109-1', 'clickideas.com.br');
    ga('send', 'pageview');

  </script>
  
</head>
<body>
  <div id="wrap">
    <header>
      <div class="container">
        <div class="row">
          <div class="col-lg-3 col-md-3">
            <a href="<?php echo site_url(); ?>" title="Voltar para o início"><img src="<?php echo base_url('assets/images/logo.png'); ?>" class="img-responsive" alt="Universo Delivery" /></a>
          </div>  
          <!--
          <div class="col-lg-9 col-md-9">
            <form method="get" action="" style="padding-top:30px;">
              <div class="input-group">
                <input type="text" name="s" class="form-control" value="" placeholder="buscar por bairro" />
                <div class="input-group-btn">
                  <button type="button" class="btn btn-primary"><span class="glyphicon glyphicon-search"></span></button>
                  <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
                  <ul class="dropdown-menu pull-right">
                    <li class="active"><a href="#">Busca por bairro</a></li>
                    <li><a href="#">Busca por cozinha</a></li>
                  </ul>
                </div>
              </div>
            </form>
          </div>
          -->
        </div>
      </div>
      <div class="navbar">
        <div class="container">
          <a class="navbar-brand" href="#">Joinville-SC</a>
          <div class="pull-right">
           <?php if(isset($user_info) && $user_info['logged_in'] && $user_info['tipo'] == 1){ ?>
           <p class="navbar-text"><?php echo $user_info["username"]; ?></p>
           <div class="btn-group">
            <?php 
            echo anchor('parasuaempresa/', 'Minha Página', array('class'=>'btn btn-primary navbar-btn')); 
            echo anchor('parasuaempresa/home/sair', 'Sair', array('class'=>'btn btn-default navbar-btn')); 
            ?>
          </div>
          <?php 
               // usuário normal/cliente
          } else if(isset($user_info) && $user_info['logged_in'] && $user_info['tipo'] == 2)
          { 
          ?>
            <p class="navbar-text"><?php echo $user_info["username"]; ?></p>
            <div class="btn-group">
              <?php echo anchor('paravoce/', 'Meus Pedidos', array('class'=>'btn btn-primary navbar-btn')); ?>
              <?php echo anchor('paravoce/home/sair', 'Sair', array('class'=>'btn btn-default navbar-btn')); ?>
            </div>
            <?php 
          } 
          else 
          { ?>
            <?php echo anchor('parasuaempresa', 'Minha Empresa', array('class'=>'btn btn-navbar navbar-btn')); ?>
            <a href="<?php echo site_url('paravoce'); ?>" class="btn btn-primary navbar-btn"><span class="glyphicon glyphicon-user"></span> Meus pedidos</a>
          <?php 
          } 
          ?>
        </div>  
      </div>
    </div>
    <div class="clearfix"></div>
  </header>

  <?php 
  if (isset($main_content) && !empty($main_content)){
    $this->load->view($main_content); 
  }
  ?>
</div>

<div id="footer">
  <div class="container">
    <div class="row">
      <div class="col-lg-2 col-md-2">
        <strong>Universo Delivery</strong><br />
        <?php
        echo anchor('universo_delivery/quem_somos', 'Quem Somos');
        echo br();
        echo anchor('universo_delivery/contato', 'Contato');
        echo br();
        echo anchor('universo_delivery/termos_de_uso', 'Termos de Uso');
        ?>
      </div>
      <div class="col-lg-2 col-md-2">
        <strong>Para você</strong><br />
        <?php
        echo anchor('paravoce/comofunciona', 'Como funciona');
        echo br();
        echo anchor('paravoce/', 'Meu cadastro');
        echo br();
        echo anchor('paravoce/perguntasfrequentes', 'Perguntas frequentes');
        ?>
      </div>
      <div class="col-lg-2 col-md-2">
        <strong>Para sua empresa</strong><br />
        <?php
        echo anchor('parasuaempresa/como_funciona', 'Como funciona');
        echo br();
        echo anchor('parasuaempresa/', 'Meu cadastro');
        echo br();
        echo anchor('parasuaempresa/perguntas_frequentes', 'Perguntas frequentes');
        ?>
      </div>
      <div class="col-lg-6 col-md-2">
        <div class="pull-right"><!--FB | TW--></div>
      </div>
    </div>
  </div>
</div>


<script src="<?php echo base_url('assets/js/jquery-1.10.1.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/jquery-migrate-1.2.1.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/bootstrap.min.js'); ?>"></script>

<?php
if(isset($scripts) && is_array($scripts) && count($scripts) > 0){
  foreach($scripts as $item){
    echo '<script src="'.$item.'"></script>';
  }
}
?>

  <!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) 
  <script src="js/respond.js"></script>-->
</body>
</html>